package mail.entity;

import java.util.Date;

/**
 * @author: Hanjiafeng
 * @date: Created in 19:24 2019/1/25
 * @desc: 邮件抽象实体
 */
public abstract class BaseMailEntity {

    /**
     * 邮件id
     */
    private String mailId;
    /**
     * 主题
     */
    private String subject;
    /**
     * 发件人
     */
    private String sender;
    /**
     * 发件箱地址
     */
    private String outboxAddress;
    /**
     * 收件人
     */
    private String recipient;
    /**
     * 收件地址
     */
    private String inboxAddress;
    /**
     * 收件时间
     */
    private Date date;
    /**
     * 邮件内容
     */
    private String content;
    /**
     * 邮箱类型
     */
    private String type;

    protected BaseMailEntity(String mailId, String subject, String sender, String senderAddress, String recipient, String recipientAddress, Date date, String content, String type) {
        this.mailId = mailId;
        this.subject = subject;
        this.sender = sender;
        this.outboxAddress = senderAddress;
        this.recipient = recipient;
        this.inboxAddress = recipientAddress;
        this.date = date;
        this.content = content;
        this.type = type;
    }

    @Override
    public String toString() {
        return "BaseMailEntity{" +
                "mailId='" + mailId + '\'' +
                ", subject='" + subject + '\'' +
                ", sender='" + sender + '\'' +
                ", outboxAddress='" + outboxAddress + '\'' +
                ", recipient='" + recipient + '\'' +
                ", inboxAddress='" + inboxAddress + '\'' +
                ", date=" + date +
                ", content='" + content + '\'' +
                ", type='" + type + '\'' +
                '}';
    }

    public final String getSubject() {
        return subject;
    }

    public final void setSubject(String subject) {
        this.subject = subject;
    }

    public final String getSender() {
        return sender;
    }

    public final void setSender(String sender) {
        this.sender = sender;
    }

    public final String getOutboxAddress() {
        return outboxAddress;
    }

    public final void setOutboxAddress(String outboxAddress) {
        this.outboxAddress = outboxAddress;
    }

    public final String getRecipient() {
        return recipient;
    }

    public final void setRecipient(String recipient) {
        this.recipient = recipient;
    }

    public final String getInboxAddress() {
        return inboxAddress;
    }

    public final void setInboxAddress(String inboxAddress) {
        this.inboxAddress = inboxAddress;
    }

    public final Date getDate() {
        return date;
    }

    public final void setDate(Date date) {
        this.date = date;
    }

    public final String getContent() {
        return content;
    }

    public final void setContent(String content) {
        this.content = content;
    }

    public final String getMailId() {
        return mailId;
    }

    public final void setMailId(String mailId) {
        this.mailId = mailId;
    }

    public final String getType() {
        return type;
    }

    public final void setType(String type) {
        this.type = type;
    }
}
